/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.androidpublisher.model;

/**
 * Offer details information related to a purchase line item.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Play Android Developer API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class ProductOfferDetails extends com.google.api.client.json.GenericJson {

  /**
   * Output only. The consumption state of the purchase.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String consumptionState;

  /**
   * The offer ID. Only present for offers.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String offerId;

  /**
   * The latest offer tags associated with the offer. It includes tags inherited from the purchase
   * option.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> offerTags;

  /**
   * The per-transaction offer token used to make this purchase line item.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String offerToken;

  /**
   * Offer details for a preorder offer. This will only be set for preorders.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PreorderOfferDetails preorderOfferDetails;

  /**
   * The purchase option ID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String purchaseOptionId;

  /**
   * The quantity associated with the purchase of the inapp product.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer quantity;

  /**
   * The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects
   * quantity-based partial refunds and full refunds.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer refundableQuantity;

  /**
   * Offer details about rent offers. This will only be set for rental line items.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private RentOfferDetails rentOfferDetails;

  /**
   * Output only. The consumption state of the purchase.
   * @return value or {@code null} for none
   */
  public java.lang.String getConsumptionState() {
    return consumptionState;
  }

  /**
   * Output only. The consumption state of the purchase.
   * @param consumptionState consumptionState or {@code null} for none
   */
  public ProductOfferDetails setConsumptionState(java.lang.String consumptionState) {
    this.consumptionState = consumptionState;
    return this;
  }

  /**
   * The offer ID. Only present for offers.
   * @return value or {@code null} for none
   */
  public java.lang.String getOfferId() {
    return offerId;
  }

  /**
   * The offer ID. Only present for offers.
   * @param offerId offerId or {@code null} for none
   */
  public ProductOfferDetails setOfferId(java.lang.String offerId) {
    this.offerId = offerId;
    return this;
  }

  /**
   * The latest offer tags associated with the offer. It includes tags inherited from the purchase
   * option.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getOfferTags() {
    return offerTags;
  }

  /**
   * The latest offer tags associated with the offer. It includes tags inherited from the purchase
   * option.
   * @param offerTags offerTags or {@code null} for none
   */
  public ProductOfferDetails setOfferTags(java.util.List<java.lang.String> offerTags) {
    this.offerTags = offerTags;
    return this;
  }

  /**
   * The per-transaction offer token used to make this purchase line item.
   * @return value or {@code null} for none
   */
  public java.lang.String getOfferToken() {
    return offerToken;
  }

  /**
   * The per-transaction offer token used to make this purchase line item.
   * @param offerToken offerToken or {@code null} for none
   */
  public ProductOfferDetails setOfferToken(java.lang.String offerToken) {
    this.offerToken = offerToken;
    return this;
  }

  /**
   * Offer details for a preorder offer. This will only be set for preorders.
   * @return value or {@code null} for none
   */
  public PreorderOfferDetails getPreorderOfferDetails() {
    return preorderOfferDetails;
  }

  /**
   * Offer details for a preorder offer. This will only be set for preorders.
   * @param preorderOfferDetails preorderOfferDetails or {@code null} for none
   */
  public ProductOfferDetails setPreorderOfferDetails(PreorderOfferDetails preorderOfferDetails) {
    this.preorderOfferDetails = preorderOfferDetails;
    return this;
  }

  /**
   * The purchase option ID.
   * @return value or {@code null} for none
   */
  public java.lang.String getPurchaseOptionId() {
    return purchaseOptionId;
  }

  /**
   * The purchase option ID.
   * @param purchaseOptionId purchaseOptionId or {@code null} for none
   */
  public ProductOfferDetails setPurchaseOptionId(java.lang.String purchaseOptionId) {
    this.purchaseOptionId = purchaseOptionId;
    return this;
  }

  /**
   * The quantity associated with the purchase of the inapp product.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getQuantity() {
    return quantity;
  }

  /**
   * The quantity associated with the purchase of the inapp product.
   * @param quantity quantity or {@code null} for none
   */
  public ProductOfferDetails setQuantity(java.lang.Integer quantity) {
    this.quantity = quantity;
    return this;
  }

  /**
   * The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects
   * quantity-based partial refunds and full refunds.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getRefundableQuantity() {
    return refundableQuantity;
  }

  /**
   * The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects
   * quantity-based partial refunds and full refunds.
   * @param refundableQuantity refundableQuantity or {@code null} for none
   */
  public ProductOfferDetails setRefundableQuantity(java.lang.Integer refundableQuantity) {
    this.refundableQuantity = refundableQuantity;
    return this;
  }

  /**
   * Offer details about rent offers. This will only be set for rental line items.
   * @return value or {@code null} for none
   */
  public RentOfferDetails getRentOfferDetails() {
    return rentOfferDetails;
  }

  /**
   * Offer details about rent offers. This will only be set for rental line items.
   * @param rentOfferDetails rentOfferDetails or {@code null} for none
   */
  public ProductOfferDetails setRentOfferDetails(RentOfferDetails rentOfferDetails) {
    this.rentOfferDetails = rentOfferDetails;
    return this;
  }

  @Override
  public ProductOfferDetails set(String fieldName, Object value) {
    return (ProductOfferDetails) super.set(fieldName, value);
  }

  @Override
  public ProductOfferDetails clone() {
    return (ProductOfferDetails) super.clone();
  }

}
